"use strict";

class Debug {}
class Point extends Debug {
  constructor(x = 10, y = 20) {
    super();
    this._x = x;
    this._y = y;
  }

  /**
   * @Debug
   * @returns {string}
   */
  toString() {
    return `<Point ${this._x}, ${this._y}>`;
  }

  get [Symbol.toStringTag]() {
    return "Point";
  }
}

const p = new Point(10, 20);

console.log(p.toString()); // '<Point 10, 20>'

console.log(Object.prototype.toString.call(p)); // '[object Point]'
